home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / sys / RCS / time.h,v < prev    next >
Text File  |  1991-11-01  |  3KB  |  161 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     91.06.10.17.21.45;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     91.03.12.12.15.04;  author kupfer;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     89.07.14.09.15.34;  author rab;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     88.06.29.14.48.19;  author ouster;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     88.06.21.16.12.56;  author ouster;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34.  
  35. desc
  36. @@
  37.  
  38.  
  39. 1.5
  40. log
  41. @Add prototypes for getitimer, setitimer, and utimes.
  42. @
  43. text
  44. @/*
  45.  * Copyright (c) 1982, 1986 Regents of the University of California.
  46.  * All rights reserved.  The Berkeley software License Agreement
  47.  * specifies the terms and conditions for redistribution.
  48.  *
  49.  *    @@(#)time.h    7.1 (Berkeley) 6/4/86
  50.  * $Header$
  51.  */
  52.  
  53. #ifndef _SYSTIME
  54. #define _SYSTIME
  55.  
  56. #include <cfuncproto.h>
  57.  
  58. /*
  59.  * Structure returned by gettimeofday(2) system call,
  60.  * and used in other calls.
  61.  */
  62. struct timeval {
  63.     long    tv_sec;        /* seconds */
  64.     long    tv_usec;    /* and microseconds */
  65. };
  66.  
  67. struct timezone {
  68.     int    tz_minuteswest;    /* minutes west of Greenwich */
  69.     int    tz_dsttime;    /* type of dst correction */
  70. };
  71. #define    DST_NONE    0    /* not on dst */
  72. #define    DST_USA        1    /* USA style dst */
  73. #define    DST_AUST    2    /* Australian style dst */
  74. #define    DST_WET        3    /* Western European dst */
  75. #define    DST_MET        4    /* Middle European dst */
  76. #define    DST_EET        5    /* Eastern European dst */
  77. #define    DST_CAN        6    /* Canada */
  78.  
  79. /*
  80.  * Operations on timevals.
  81.  *
  82.  * NB: timercmp does not work for >= or <=.
  83.  */
  84. #define    timerisset(tvp)        ((tvp)->tv_sec || (tvp)->tv_usec)
  85. #define    timercmp(tvp, uvp, cmp)    \
  86.     ((tvp)->tv_sec cmp (uvp)->tv_sec || \
  87.      (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
  88. #define    timerclear(tvp)        (tvp)->tv_sec = (tvp)->tv_usec = 0
  89.  
  90. /*
  91.  * Names of the interval timers, and structure
  92.  * defining a timer setting.
  93.  */
  94. #define    ITIMER_REAL    0
  95. #define    ITIMER_VIRTUAL    1
  96. #define    ITIMER_PROF    2
  97.  
  98. struct    itimerval {
  99.     struct    timeval it_interval;    /* timer interval */
  100.     struct    timeval it_value;    /* current value */
  101. };
  102.  
  103. #ifndef KERNEL
  104. #include <time.h>
  105. #endif
  106.  
  107. _EXTERN int    getitimer _ARGS_((int timer, struct itimerval *valuePtr));
  108. _EXTERN int    gettimeofday _ARGS_ ((struct timeval *tvPtr,
  109.                       struct timezone *tzPtr));
  110. _EXTERN int    settimeofday _ARGS_ ((_CONST struct timeval *tvPtr,
  111.                       _CONST struct timezone *tzPtr));
  112. _EXTERN int    setitimer _ARGS_((int timer, _CONST struct itimerval *newPtr,
  113.                   struct itimerval *oldPtr));
  114. _EXTERN int    utimes _ARGS_((_CONST char *file,
  115.                    _CONST struct timeval *tvPtr));
  116.  
  117. #endif /* _SYSTIME */
  118. @
  119.  
  120.  
  121. 1.4
  122. log
  123. @Add prototypes for gettimeofday and settimeofday.
  124. @
  125. text
  126. @d7 1
  127. d64 1
  128. d69 4
  129. @
  130.  
  131.  
  132. 1.3
  133. log
  134. @*** empty log message ***
  135. @
  136. text
  137. @d12 2
  138. d62 5
  139. @
  140.  
  141.  
  142. 1.2
  143. log
  144. @Add ifdefs to prevent files from being included multiple times.
  145. @
  146. text
  147. @d61 1
  148. a61 1
  149. #endif _SYSTIME
  150. @
  151.  
  152.  
  153. 1.1
  154. log
  155. @Initial revision
  156. @
  157. text
  158. @d9 3
  159. d60 2
  160. @
  161.